package com.IO.Buffered01;

import java.io.*;

public class A01 {
    public static void main(String[] args) throws IOException {
        // 创建缓冲流对象
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("untitled\\aaa.txt"));
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("untitled\\bbb.txt"));
        // 循环读取并拷贝到目的地
        int b;
        while ((b = bis.read()) != -1) {
            bos.write(b);
        }
        // 释放资源
        bos.close();
        bis.close();
    }
}
